import request from '@/utils/request'

// 查询订单信息列表
export function listSale(query) {
  return request({
    url: '/data/sale/list',
    method: 'get',
    params: query
  })
}

// 查询订单信息详细
export function getSale(id) {
  return request({
    url: '/data/sale/' + id,
    method: 'get'
  })
}

// 新增订单信息
export function addSale(data) {
  return request({
    url: '/data/sale',
    method: 'post',
    data: data
  })
}

// 修改订单信息
export function updateSale(data) {
  return request({
    url: '/data/sale',
    method: 'put',
    data: data
  })
}

// 删除订单信息
export function delSale(id) {
  return request({
    url: '/data/sale/' + id,
    method: 'delete'
  })
}

// 审核订单信息
export function examSale(data) {
  return request({
    url: '/data/sale/exam',
    method: 'put',
    data: data
  })
}

// 撤销订单信息
export function cancelSale(data) {
  return request({
    url: '/data/sale/cancel',
    method: 'put',
    data: data
  })
}
